/**
 * SysQueue Controller层
 */
app.controller('sysQueueCtrl',function ($scope, sysQueueService, $timeout) {
    var msgBox = null;
    function findAllSysQueue(){
        sysQueueService.findAll(
            {action: 'findAllSysQueue'},
            function(data){
            if(data.state == 'SUCCESS'){
                $scope.queueList = data.data.queueVO;
            }else{
                if(msgBox == null){
                   msgBox = bootbox.alert(data.reason,function(){
                       msgBox = null;
                   });
                }
            }
            $timeout(function(){
                findAllSysQueue();
            },$scope.selectTime);
        });
    }
    findAllSysQueue();
    $scope.changeTime = function (time) {
        $scope.selectTime = time;
    };
});